//
//  AppState.swift
//  物料商行
//
//  Created by HaoDong Hong on 2017/9/4.
//  Copyright © 2017年 HaoDong Hong. All rights reserved.
//

import Foundation

public struct App {
    static var state: AppState {
        get {
            let integer = UserDefaults.standard.integer(forKey: "AppState")
            return AppState(rawValue: integer)!
        }
        set {
            let integer = newValue.rawValue
            UserDefaults.standard.set(integer, forKey: "AppState")
        }
    }
}
